<?php
namespace Home\Model;
use Think\Model;
class ActivityModel extends Model{
	/*protected $tableName = 'activity_basic';

  protected $status = array(
  	    "1"=>"待审批",
        "2"=>"审批通过",
        "3"=>"审批不通过"
  	);
*/
  /**
  * 返回审批状态
  * 
  * @return string|array
  */
  /*public function getStatus($index=NULL){
  	if (is_int($index)) {
  		return $this->status[$index];
  	} else {
  		return $this->status;
  	}
  }

  public function getSb(){
    return $this->join('left join user_info as ui on ui.user_id=activity_basic.app_user')
         ->join('left join user_info as uin on uin.user_id=activity_basic.organiser')
         ->join('left join user_info as uinf on uinf.user_id=activity_basic.approver')
         ->join('left join user_info as uinfo on uinfo.user_id=activity_basic.approver_two')
         ->field('ui.realname as name,uin.realname as organiser_name,uinf.realname as approver_name,uinfo.realname as approver_two_name,activity_basic.*');
  }*/




































	
}